home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr47 / wasm223.zip / BTEST.C < prev    next >
Text File  |  1993-05-04  |  673b  |  34 lines

  1. /*
  2. ** This Turbo C program uses the BIT
  3. ** function defined in BIT.ASM
  4. **
  5. ** Compile with:
  6. **
  7. **   WASM bit bit.obj
  8. **   TCC btest bit.obj
  9. **
  10. ** Note: This C program should be
  11. ** compiled using a far code model
  12. ** (medium, large, or huge).
  13. */
  14.  
  15. #include <stdio.h>
  16.  
  17. /* define external function */
  18.  
  19. #ifdef __cplusplus
  20. extern "C" { long pascal BIT (int b); }         /* this is Turbo C++ def */
  21. #else
  22. long pascal BIT (int b);                        /* this is Turbo C def */
  23. #endif
  24.  
  25. int main ()
  26. {
  27.   int i;
  28.  
  29.   for (i = 1; i <= 32; i++)             /* for each bit */
  30.     printf ("%lX\n", BIT (i));          /* display results */
  31.  
  32.   return 0;
  33. }
  34.